#!groovy
@Library("jenkinslib") _
def build=new org.devops.build()
def deploy=new org.devops.deploy()

//调用Jenkins中定义的选项参数 名称和Jenkins中定义的保持一致
String buildType="${env.buildType}"
String buildshell="${env.buildshell}"
String deployHosts="${env.deployHosts}"
pipeline{
    agent any
    stages{
        stage("build"){
            steps{
                script{
                    //集成构建工具
                    build.Build(buildType,buildshell)

                    //集成ansible工具
                    deploy.AnsibleDeploy(deployHosts,"-m ping")
                }
            }
        }
    }
}